In early programming languages, memory allocation and deallocation was a burden imposed directly on the programmer, who was responsible for allocating and deallocating memory blocks. This burden was eased by the introduction of garbage collectors, which are programs that deallocate memory that is assigned to dead or unreachable objects. Garbage collectors have improved programmer productivity and have enhanced software reliability. They are supported by a variety of modern programming languages, such as Java™.
The Java Virtual Machine Profiler Interface (JVMPI) is a two-way function call interface between the Java virtual machine and an in-process profiler agent. The profiler agent issues controls and requests for information through the JVMPI. In response, the virtual machine notifies the profiler agent of various events, corresponding, for example, to heap allocation, thread start, etc. The JVMPI can be used by profiling tools to obtain information on memory allocation sites, CPU usage hot-spots, unnecessary object retention, and monitor contention. JVMPI is available from Sun Microsystems (Palo Alto, Calif.).